package org.jsbd.boss.dao.impl;

import java.util.List;

import org.jsbd.boss.dao.IBookMarkFailCountDao;
import org.jsbd.boss.domian.BookMark;
import org.jsbd.boss.domian.BookMarkFailCount;

public class BookMarkFailCountDaoImpl extends CrackBaseDao implements IBookMarkFailCountDao {

	@Override
	public void save(BookMarkFailCount bookMarkFailCount) {
		super.insert("qy_book_mark_fail_count.insert_book_mark_fail_count", bookMarkFailCount);
	}

	@Override
	public int updateFailCount(BookMarkFailCount bookMarkFailCount) {
		return super.update("qy_book_mark_fail_count.update_book_mark_fail_count", bookMarkFailCount);
	}

	@Override
	public BookMarkFailCount get(BookMarkFailCount bookMarkFailCount) {
		return (BookMarkFailCount) super.queryForObject("qy_book_mark_fail_count.select_book_mark_fail_count_one", bookMarkFailCount);
	}

	@SuppressWarnings("unchecked")
	@Override
	public List<BookMarkFailCount> getList(BookMarkFailCount bookMarkFailCount) {
		return super.queryForList("qy_book_mark_fail_count.select_book_mark_fail_count_list", bookMarkFailCount);
	}

	@Override
	public Integer getListPageCount(BookMarkFailCount bookMarkFailCount) {
		return super.queryForCount("qy_book_mark_fail_count.select_book_mark_fail_count_page_count", bookMarkFailCount);
	}
	
	@Override
	public void resetAllMarkFailCount() {
		super.update("qy_book_mark_fail_count.reset_all_mark_fail_count", 1);
	}
	
}
